#回文素数
#判断素数
def is_prim(num):
    for i in range(2, int(num ** 0.5) + 1):
        if num % i == 0:
            return False
    return True
#判断回文数
def is_pal(num):
    arr = []
    while num != 0:
        arr.append(num % 10)
        num //= 10
    #遍历数组
    left = 0
    right = len(arr) - 1
    # print(arr)
    while left <= right:
        if arr[left] == arr[right]:
            if left == right:
                return True
            left += 1
            right -= 1
        if arr[left] != arr[right]:
            return False
    if left > right and arr[left] == arr[right]:
        return True


# count = 0
# i = 2
# while count < 100:
#     if is_prim(i) and is_pal(i):
#         count += 1
#         print(i, end = " ")
#         if count % 10 == 0:
#             print()
#     i += 1
# print()


#得到反素数
def rever_pri(i):
    arr = []
    num = 0
    while i != 0:
        arr.append(i % 10)
        i //= 10
    left = 0
    # print(arr)
    right = len(arr) - 1
    while right >= 0 and left <= len(arr) - 1:
        num += arr[left] * 10 ** right
        left += 1
        right -= 1
    return num



#反素数
# count = 0
# i = 2
# while count < 100:
#     if is_prim(i) and not is_pal(i):
#         if is_prim(rever_pri(i)):
#             count += 1
#             print(i, end = " ")
#             if count % 10 == 0:
#                 print()
#     i += 1


#双素数
#判断是否是双素数
def is_pait_prim(a, b):
    if is_prim(a) and is_prim(b) and b - a == 2:
        return True
    else:
        return False
    
i = 2
count = 0
while i < 1000:
    j = 2
    while j < 1000:
        if is_pait_prim(i, j):
            count += 1
            print((i, j), end = " ")
            if count % 10 == 0:
                print()
        j += 1
    i += 1

    
#梅森素数

# p = 2
# while p <= 31:
#     mersenne_prime = 2 ** p - 1
#     if is_prim(mersenne_prime):
#         print(mersenne_prime, end = " ")
#     p += 1

#升序排序
def sort_numbers(num1, num2, num3):
    if num1 > num2 > num3:
        print(num3, num2, num1)
    elif num1 > num3 > num2:
        print(num2, num3, num1)
    elif num2 > num1 > num3:
        print(num3, num1, num2)
    elif num2 > num3 > num1:
        print(num1, num3, num2)
    elif num3 > num1 > num2:
        print(num2, num1, num3)
    elif num3 > num2 > num1:
        print(num1, num2, num3)

# x, y, z = map(float,input("请输入三个数字:").split(" "))
# sort_numbers(x, y, z)

"""
              1
    		2 1
...       3 2 1
n n-1 ... 3 2 1
"""
def display_pattern(n):
    for i in range(1, n + 1):
            #空格
        for k in range(n - i):
            print(" " * 2, end = " ")
            #数据
        for j in range(i, 0, -1):
            print(f'{j:>2d}',end = " ")
        print()

# display_pattern(10)

"""
m(i) = 1/2 + 2/3 + ... + i/(i + 1)
"""
def func(i):
    #分子
    fenzi = 1
    #分母
    fenmu = 2
    #累加
    the_sum = 0
    for j in range(i):
        num = fenzi / fenmu
        the_sum += num
        fenzi += 1
        fenmu += 1
    return the_sum

n = int(input("请输入一个整数:"))
i = 1
print(" i     m(i)")
while i <= n:
    print(f'{i:>2d}     {func(i):.2f}')
    i += 1
